            <!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->

<html>
<head>
<title>FUNZIP(1) manual page</title>
</head>
<body bgcolor='white'>
<a href='#toc'>Table of Contents</a><p>

<h2><a name='sect0' href='#toc0'>Name</a></h2>
funzip - filter for extracting from a ZIP archive in a pipe
 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>funzip</b> [<b>-password</b>] [<i>input[.zip|.gz]</i>]  
<h2><a name='sect2' href='#toc2'>Arguments</a></h2>

<dl>

<dt>[<i>-password</i>]</dt>
<dd>Optional
password to be used if ZIP archive is encrypted.  Decryption may not be
supported at some sites.  See DESCRIPTION for more details. </dd>

<dt>[<i>input[.zip|.gz]</i>]</dt>
<dd>Optional
input archive file specification. See DESCRIPTION for details.   </dd>
</dl>

<h2><a name='sect3' href='#toc3'>Description</a></h2>
<i>funzip</i>
without a file argument acts as a filter; that is, it assumes that a ZIP
archive (or a <i>gzip</i>&rsquo;<a href='d.1'>d(1)</a>
 file) is being piped into standard input, and it
extracts the first member from the archive to stdout. When stdin comes from
a tty device, <i>funzip</i> assumes that this cannot be a stream of (binary) compressed
data and shows a short help text, instead. If there is a file argument,
then input is read from the specified file instead of from stdin. <p>
A password
for encrypted zip files can be specified on the command line (preceding
the file name, if any) by prefixing the password with a dash.  Note that
this constitutes a security risk on many systems; currently running processes
are often visible via simple commands (e.g., <a href='ps.1'><i>ps</i>(1)</a>
 under Unix), and command-line
histories can be read. If the first entry of the zip file is encrypted and
no password is specified on the command line, then the user is prompted
for a password and the password is not echoed on the console. <p>
Given the
limitation on single-member extraction, <i>funzip</i> is most useful in conjunction
with a secondary archiver program such as <a href='tar.1'><i>tar</i>(1)</a>
. The following section
includes an example illustrating this usage in the case of disk backups
to tape.   
<h2><a name='sect4' href='#toc4'>Examples</a></h2>
To use <i>funzip</i> to extract the first member file of the
archive test.zip and to pipe it into <a href='more.1'><i>more</i>(1)</a>
: <p>
 <br>
<pre>funzip test.zip | more
</pre>  <p>
To use <i>funzip</i> to test the first member file of test.zip (any errors will
be reported on standard error): <p>
 <br>
<pre>funzip test.zip &gt; /dev/null
</pre>  <p>
To use <i>zip</i> and <i>funzip</i> in place of <a href='compress.1'><i>compress</i>(1)</a>
 and <a href='zcat.1'><i>zcat</i>(1)</a>
 (or <a href='gzip.1'><i>gzip</i>(1)</a>

and <a href='gzcat.1'><i>gzcat</i>(1)</a>
) for tape backups: <p>
 <br>
<pre>tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k
dd if=/dev/nrst0 ibs=8k | funzip | tar xf -
</pre>  <p>
(where, for example, nrst0 is a SCSI tape drive).   
<h2><a name='sect5' href='#toc5'>Bugs</a></h2>
When piping an
encrypted file into <i>more</i> and allowing <i>funzip</i> to prompt for password, the
terminal may sometimes be reset to a non-echo mode.  This is apparently due
to a race condition between the two programs; <i>funzip</i> changes the terminal
mode to non-echo before <i>more</i> reads its state, and <i>more</i> then &lsquo;&lsquo;restores&rsquo;&rsquo; the
terminal to this mode before exiting.  To recover, run <i>funzip</i> on the same
file but redirect to /dev/null rather than piping into more; after prompting
again for the password, <i>funzip</i> will reset the terminal properly. <p>
There is
presently no way to extract any member but the first from a ZIP archive.
 This would be useful in the case where a ZIP archive is included within
another archive.  In the case where the first member is a directory, <i>funzip</i>
simply creates the directory and exits. <p>
The functionality of <i>funzip</i> should
be incorporated into <i>unzip</i> itself (future release).   
<h2><a name='sect6' href='#toc6'>See Also</a></h2>
<a href='gzip.1'><i>gzip</i>(1)</a>
, <a href='unzip.1'><i>unzip</i>(1)</a>
,
<a href='unzipsfx.1'><i>unzipsfx</i>(1)</a>
, <a href='zip.1'><i>zip</i>(1)</a>
, <a href='zipcloak.1'><i>zipcloak</i>(1)</a>
, <a href='zipinfo.1'><i>zipinfo</i>(1)</a>
, <a href='zipnote.1'><i>zipnote</i>(1)</a>
, <a href='zipsplit.1'><i>zipsplit</i>(1)</a>
 
 
<h2><a name='sect7' href='#toc7'>URL</a></h2>
The Info-ZIP home page is currently at  <br>
<pre>http://www.info-zip.org/pub/infozip/
</pre>  or  <br>
<pre>ftp://ftp.info-zip.org/pub/infozip/ .
</pre>    
<h2><a name='sect8' href='#toc8'>Author</a></h2>
Mark Adler (Info-ZIP) <p>

<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Arguments</a></li>
<li><a name='toc3' href='#sect3'>Description</a></li>
<li><a name='toc4' href='#sect4'>Examples</a></li>
<li><a name='toc5' href='#sect5'>Bugs</a></li>
<li><a name='toc6' href='#sect6'>See Also</a></li>
<li><a name='toc7' href='#sect7'>URL</a></li>
<li><a name='toc8' href='#sect8'>Author</a></li>
</ul>
</body>
</html>
